#! /usr/bin/python

import time
import math

t1 = time.time()

def gcd(a, b):
    if b == 0: return a
    return gcd(b, a%b)

upper = 1500000
limit = int(math.sqrt(upper))

l=12
ts = [0]*upper

for n in range(1, limit, 2):
    for m in range(2, limit, 2):
	 if gcd(m, n) == 1: 
	    l = 2*m*n+m**2+n**2+abs(m**2-n**2)
	    #print m, n	    
	    ss = l
	    while(ss<upper):
	        if ss == 36: print m, n
		ts[ss] +=1
		ss +=l

print ts.count(1), ts[36], time.time()-t1
             
